Sending Alerts to E-mail |
In this section, you will learn how to use e-mail and receive log messages and alerts. The following example illustrates the configuration of the SMTPAppender which publishes the alerts to the E-mail.
Adding a logging category
- Go to the Process_Platform_install_dir/config directory and open the file Log4jConfiguration.xml.
- Add the following category.
<category name="com.eibus.management.AlertSystem"> <priority value="info"/> <appender-ref ref="e-mail"/> </category>
- Add the Appender for e-mail
<appender class="org.apache.log4j.net.SMTPAppender" name="e-mail"> <param name="SMTPHost" value="srv-ind-dm19jw"/> <param name="To" value="[email protected]"/> <param name="From" value="[email protected]"/> <param name="subject" value="Process Platform Alert"/> <param name="EvaluatorClass" value="com.eibus.util.logger.TriggerEvent"/> <layout class="org.apache.log4j.HTMLLayout"> <param name="LocationInfo" value="true"/> </layout> </appender>
- Save the configuration.
Viewing log entries
- Perform any operation that raises the alerts. For example, restarting the Monitor, sending license report, restarting the database server and so on.
- Check the mail box for the alerts. The following is an example of an error alert in email: